package com.iphanta.community.user.mapper;

import com.iphanta.community.following.traffic.vo.UserSimpleInfo;
import com.iphanta.community.user.entity.Relation;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 墨声 E-mail: zehong.hongframe.huang@gmail.com
 * create time: 2/21/22 10:32 AM
 */
@Mapper
public interface RelationMapper {

    List<Relation> selectFansList(String followingId);

    Relation selectOne(String followingId, String followerId);

    Integer insert(Relation relation);

    Integer updateRelationById(Long id);

    Integer delRelationById(Long id);

    Long followerCount(String uid);

    List<UserSimpleInfo> followers(String uid);

    List<UserSimpleInfo> followings(String uid);

    Long followingCount(String uid);

    Integer relation(String userId, String uid1);

}
